package com.vallis.asfc.controller;


import com.vallis.asfc.service.PermissionService;
import com.vallis.asfc.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author vallis
 * @since 2020-06-14
 */
@RestController
@CrossOrigin
@RequestMapping("/permission")
public class PermissionController {
@Autowired
    private PermissionService permissionService;
    
    @GetMapping("getAllPermission")
    public Result getAllPermission(){
        System.out.println("调用了权限接口");
        return new Result("成功",permissionService.list());
    }


    
}
